package lgs.hm;

public class TestDiHGui {
	
	public static void main(String[] args) {
		test();
		
		System.out.println(diGui(5));
		
		
		
	}
	public static int diGui(int i) {
		if(i==1) {
			return 1;
		}
		return i*diGui(i-1);
	}

	private static void test() {
		//算5的阶乘
		int a = 1;
		for(int i=2;i<=5;i++) {
			a = a*i;
		}
		System.out.println(a);
	}

}
